home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 46 / Amiga Format CD46 (1999-10-20)(Future Publishing)(GB)[!][issue 1999-12].iso / -serious- / programming / other / tandem / teaching / 18.asm < prev    next >
Assembly Source File  |  1999-09-06  |  318b  |  23 lines

  1. * 18.asm    conditional assembly    version 0.00   1.9.97
  2.  
  3. * do add or sub
  4. arith: macro
  5.  move.l d0,-(a7)
  6.  move.l #\1,d0
  7.  ifc '\2','+'
  8.  add.l #\3,d0
  9.  endc
  10.  ifc '\2','-'
  11.  sub.l #\3,d0
  12.  endc
  13.  move.l d0,\4
  14.  move.l (a7)+,d0
  15.  endm
  16.  
  17. * do some math
  18.  arith 10,+,10,d1
  19.  arith 10,-,10,d2
  20.  arith 20,+,10,d3
  21.  arith 20,-,10,d4
  22.  rts
  23.